<?php
include("../../config.php");
include_once(APP_PATH . "/collect/Common/yzs1013_pldr.php");
$is_reset_send=1;
$_POST["s_url"]=$_POST["s_url"]??'';
$_GET["s_url"]=$_GET["s_url"]??'';
$_POST["gindex"]=$_POST["gindex"]??'';
$_GET["gindex"]=$_GET["gindex"]??'';
$_POST["code"]=$_POST["code"]??'';
$_GET["code"]=$_GET["code"]??'';
$_POST["bfid"]=$_POST["bfid"]??'';
$_GET["bfid"]=$_GET["bfid"]??'';
$_POST["gather_type"]=$_POST["gather_type"]??'';
$_GET["gather_type"]=$_GET["gather_type"]??'';
$_POST["api"]=$_POST["api"]??'';
$_GET["api"]=$_GET["api"]??'';
$_POST["ptid"]=$_POST["ptid"]??'';
$_GET["ptid"]=$_GET["ptid"]??'';
$_POST["tid"]=$_POST["tid"]??'';
$_GET["tid"]=$_GET["tid"]??'';
$_POST["host"]=$_POST["host"]??'';
$_GET["host"]=$_GET["host"]??'';
$_POST["loginurl"]=$_POST["loginurl"]??'';
$_GET["loginurl"]=$_GET["loginurl"]??'';
$_POST["loginyzm"]=$_POST["loginyzm"]??'';
$_GET["loginyzm"]=$_GET["loginyzm"]??'';
$_POST["ptusername"]=$_POST["ptusername"]??'';
$_GET["ptusername"]=$_GET["ptusername"]??'';
$_POST["ptpassword"]=$_POST["ptpassword"]??'';
$_GET["ptpassword"]=$_GET["ptpassword"]??'';
$_GET["bug"]=$_GET["bug"]??'';
$_POST["bug"]=$_POST["bug"]??'';
$_GET["source"]=$_GET["source"]??'';
$_POST["source"]=$_POST["source"]??'';
$_GET["cookie"]=$_GET["cookie"]??'';
$_POST["cookie"]=$_POST["cookie"]??'';
$_GET["htmlpageuse"]=$_GET["htmlpageuse"]??'';
$_POST["htmlpageuse"]=$_POST["htmlpageuse"]??'';


if($_POST["s_url"]){
    $s_url=$_POST['s_url'];
    $thisurl=$s_url;
}elseif($_GET['s_url']){
    $s_url=$_GET['s_url'];
    $thisurl=$s_url;
}
$s_url=urldecode($s_url);
$s_url=(substr($s_url,0,2)=="//")?"http:".$s_url:$s_url;
$thisurl=$s_url;

if($_POST['gather_type']){
    $gather_type=$_POST['gather_type'];
}elseif($_GET['gather_type']){
    $gather_type=$_GET['gather_type'];
}

if($_POST['gindex']){
    $gindex=$_POST['gindex'];
}elseif($_GET['gindex']){
    $gindex=$_GET['gindex'];
}


if($_POST['code']){
    $code=$_POST['code'];
}elseif($_GET['code']){
    $code=$_GET['code'];
}

if($_POST['bfid']){
    $bfid=$_POST['bfid'];
}elseif($_GET['bfid']){
    $bfid=$_GET['bfid'];
}

if ($_POST['api']) {
    $api = $_POST['api'];
} elseif ($_GET['api']) {
    $api = $_GET['api'];
}

if($_POST['ptid']){
    $ptid=$_POST['ptid'];
}elseif($_GET['ptid']){
    $ptid=$_GET['ptid'];
}

if($_POST['tid']){
    $tid=$_POST['tid'];
}elseif($_GET['tid']){
    $tid=$_GET['tid'];
}
$host="";
if($_POST['host']){
    $host=$_POST['host'];
}elseif($_GET['host']){
    $host=$_GET['host'];
}
if($host=="") {
    $host = host($s_url);
}

if($_POST['loginurl']){
    $loginurl=$_POST['loginurl'];
}elseif($_GET['loginurl']){
    $loginurl=$_GET['loginurl'];
}

if($_POST['loginyzm']){
    $loginyzm=$_POST['loginyzm'];
}elseif($_GET['loginyzm']){
    $loginyzm=$_GET['loginyzm'];
}

if($_POST['ptusername']){
    $username=$_POST['ptusername'];
}elseif($_GET['ptusername']){
    $username=$_GET['ptusername'];
}


if($_POST['ptpassword']){
    $password=$_POST['ptpassword'];
}elseif($_GET['ptpassword']){
    $password=$_GET['ptpassword'];
}
if($_POST['bug']){
    $bug=$_POST['bug'];
}elseif($_GET['bug']){
    $bug=$_GET['bug'];
}

if($_POST['source']){
    $source=$_POST['source'];
}elseif($_GET['source']){
    $source=$_GET['source'];
}

if($_POST['cookie']){
    $cookie=$_POST['cookie'];
}elseif($_GET['cookie']){
    $cookie=$_GET['cookie'];
}
if($cookie!="") {
    $cookiedata = array();
    $cookiedata["cookie"] = $cookie;
    insertupdate("longzs.longzs_re", $cookiedata, "select id from longzs.longzs_re where host='{$host}'");
}

if($_POST['htmlpageuse']){
    $htmlpageuse=$_POST['htmlpageuse'];
}elseif($_GET['htmlpageuse']){
    $htmlpageuse=$_GET['htmlpageuse'];
}


$gather_type=($gather_type=="")?1:$gather_type;
//$url="http://longzs.duapp.com/collect/index.php?onlyread=0&gather_type=1&s_url=".urlencode($s_url)."&s=".rand(10000,99999);
//http://collect2.longsunhd.com/collect/index.php?gather_type=6&gindex=2&ptid=2&tid=6&host=www.guiwang.org&cookie=PHPSESSID%3Dleuiffamht2e3ema2ujj18evn7&username=admin&password=159456&s_url=http%3A%2F%2Fpypt.rednet.cn%2FColumn.aspx%3FColId%3D4&s=0.6188209886074043&bug=2
//$url="http://".$_SERVER['HTTP_HOST']."/collect/index.php?onlyread=0&gather_type=$gather_type&gindex=$gindex&ptid=$ptid&tid=$tid&host=$host&code=$code&cookie=$cookie$username=$ptusername&password=$ptpassword&s_url=".urlencode($s_url)."&s=".rand(10000,99999);
//$nr=file_get_contents($url);
include_once($_SERVER["DOCUMENT_ROOT"]."/collect/index.php");
//echo $nr;
?>